View Javadoc
1 package jrre.api.java.lang.reflect; 2 3 public class Methods { 4 5 private MethodEntry [] methodEntries; 6 private int size; 7 8 public Methods (){ 9 10 } 11 12 public Methods(MethodEntry [] methodEntries){ 13 14 //for(int i=0,j=methodEntries.length;i < methodEntries.length;i++,j--) 15 //System.out.println("ME: "+methodEntries[i]); 16 17 this.methodEntries = methodEntries; 18 size = methodEntries.length; 19 } 20 21 public MethodEntry getMethod(int cpIndex){ 22 23 return methodEntries[cpIndex]; 24 } 25 26 public MethodEntry getMethod(String fullyQualifiedName){ 27 28 //System.out.println(size+" "+methodEntries.length); 29 for(int i=1;i < methodEntries.length;i++){ 30 //System.out.println(methodEntries[i].getFullyQualifiedName()); 31 if(methodEntries[i].getFullyQualifiedName().equals(fullyQualifiedName)){ 32 return methodEntries[i]; 33 } 34 } 35 //System.out.println("Method: " + fullyQualifiedName + ", fully qualified name not found."); 36 return null; 37 } 38 39 public int getSize(){ 40 return size; 41 } 42 43 public String toString(){ 44 StringBuffer toReturn = new StringBuffer(); 45 46 toReturn.append("Methods: "); 47 for(int i=0;i < methodEntries.length;i++){ 48 toReturn.append(methodEntries[i]); 49 } 50 51 return toReturn.toString(); 52 } 53 54 }

This page was automatically generated by Maven